def split_text_by_fixed_length_with_overlap(text, length, overlap):
    # 使用列表推导式按固定长度及重叠长度切分文本
    return [text[i:i + length] for i in range(0, len(text) - overlap, length - overlap)]

# 文本
text = "盼望着，东风来了，春天的脚步近了。"

# 定义每个片段的长度和重叠长度
chunk_length = 6
overlap_length = 2

# 调用函数进行分割
result = split_text_by_fixed_length_with_overlap(text, chunk_length, overlap_length)
print(result)

# 打印结果
for i, segment in enumerate(result):
    print(f"Chunk {i+1}: {segment}")